package icu.zqyhdm.utils;

import java.text.DecimalFormat;
import java.util.Random;

/**
 * @Description
 * @Author lifu
 * @Date 2021/5/19 20:13
 */
public class RandomUtil {
    private static final Random random = new Random();

    private static final DecimalFormat sixdf = new DecimalFormat("000000");
    //六位验证码
    public static String getSixBitRandom() {
        return sixdf.format(random.nextInt(1000000));
    }

    public static void main(String[] args) {
        System.out.println(getSixBitRandom());
    }
}
